Skip to content

Potential fix for code scanning alert no. 4: Workflow does not contain permissions#136

Draft
doismellburning wants to merge 1 commit intomainfrom
build/gha-permissions
Draft

Potential fix for code scanning alert no. 4: Workflow does not contain permissions#136
doismellburning wants to merge 1 commit intomainfrom
build/gha-permissions

Conversation

@doismellburning
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/doismellburning/python-template/security/code-scanning/4

Add an explicit permissions block at the workflow root so all jobs inherit least-privilege token access unless overridden later. For this workflow, the minimal safe baseline is:

  • contents: read (needed for checkout and repository read access)

Edit .github/workflows/test.yml by inserting permissions: after the concurrency block (or near the top-level keys before jobs:). No imports, methods, or additional definitions are needed (YAML workflow only).

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant